package com.example.pungolo.journal.model;

import com.example.pungolo.journal.R;

public enum Mood {
  happy     (1,  R.drawable.mood_happy      ,R.string.mood_happy      ),
  sad       (2,  R.drawable.mood_sad        ,R.string.mood_sad        ),
  angry     (3,  R.drawable.mood_angry      ,R.string.mood_angry      ),
  kiss      (4,  R.drawable.mood_kiss       ,R.string.mood_kiss       ),
  cool      (5,  R.drawable.mood_cool       ,R.string.mood_cool       ),
  angel     (6,  R.drawable.mood_angel      ,R.string.mood_angel      ),
  crying    (7,  R.drawable.mood_crying     ,R.string.mood_crying     ),
  devil     (8,  R.drawable.mood_devil      ,R.string.mood_devil      ),
  embarassed(9,  R.drawable.mood_embarrassed,R.string.mood_embarrassed),
  laugh     (10, R.drawable.mood_laugh      ,R.string.mood_laugh      ),
  raspberry (11, R.drawable.mood_raspberry  ,R.string.mood_raspberry  ),
  smirk     (12, R.drawable.mood_smirk      ,R.string.mood_smirk      ),
  surprise  (13, R.drawable.mood_surprise   ,R.string.mood_surprise   ),
  tired     (14, R.drawable.mood_tired      ,R.string.mood_tired      ),
  uncertain (15, R.drawable.mood_uncertain  ,R.string.mood_uncertain  ),
  worried   (16, R.drawable.mood_worried    ,R.string.mood_worried    );
  
  public final int id;
  public final int drawable;
  public final int description;
  Mood(int id, int res, int description) {
    this.id = id;
    this.drawable = res;
    this.description = description;
  }
  public static Mood getMoodFromId(int id) {
    Mood[] moods = Mood.values();
    for (Mood m : moods) {
      if (m.id == id)
        return m;
    }
    return null;
  }
  /*public static Mood getMoodFromRes(int res) {
    Mood[] moods = Mood.values();
    for (Mood m : moods) {
      if (m.drawable == res)
        return m;
    }
    return null;
  }*/
}
